package com.lianxi.Courses.service;

import com.github.pagehelper.PageInfo;
import com.lianxi.Courses.entity.Course;
import com.lianxi.Courses.entity.Resource;
import com.lianxi.Courses.exception.FileDownloadErrorException;
import com.lianxi.Courses.exception.RequestParameterErrorException;

import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.UnsupportedEncodingException;


/**
 * 翔哥
 * 2025年10月13日
 */
public interface ResourceService {

    PageInfo<Resource> findPage(Resource resource, String pageNo, String pageSize);

    //修改状态
    void updateStatus(String id) throws RequestParameterErrorException;

    //根据id找
    Resource findById(String id) throws RequestParameterErrorException;

    //pdf下载
    void downloadFile(String id, HttpServletResponse response,HttpSession session) throws UnsupportedEncodingException, RequestParameterErrorException, FileDownloadErrorException;

    //根据资源id找到课程
    Course findByIdForCourse(String id) throws RequestParameterErrorException;

}
